using System.Collections;
using System.Collections.Generic;
using UnityEngine;

// 控制障碍物朝向摄像机

public class FaceToCamera : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
    }

    // Update is called once per frame
    void Update()
    {
        for(int i = 0;i < transform.childCount;i ++){
            transform.GetChild(i).rotation = Camera.main.transform.rotation;
        }
    }
}
